<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');



class Model_screen extends CI_Model{
    
    public function get_all_screens(){
        $clause = 'SELECT * FROM screen LIMIT 0, 10';
        $query  = new QUERY();
        $result = $query->run($clause)->fetchAll(PDO::FETCH_ASSOC);
        unset($query);
        return $result;
    }
    
    public function add_screen($data){
        $query  = new QUERY(array('TABLE'=>'screen'));
        $result = $query->save($data);
        unset($query);
        return $result;
    }
    
    public function delete_screen($key=array())
    {
        $query  = new QUERY(array('TABLE'=>'screen','KEY'=>$key));
        $result = $query->delete();
        return $result;
    }
}
?>
